package dk.hewison.client.pages;

import com.google.gwt.user.client.ui.TextArea;
import com.google.gwt.user.client.ui.Widget;
import dk.hewison.client.data.Callback;
import dk.hewison.client.data.DataController;
import dk.hewison.client.domain.Directory;


/**
 * @author John Hewison
 * @author $LastChangedBy: john.hewison $:  $ $LastChangedDate: 2009-02-03 19:28:40 +0000 (Tue, 03 Feb 2009) $:
 * @version $Revision: 357 $:
 */
public class StartPage extends Page {

    TextArea textArea;

    protected Widget initPage() {
        textArea = new TextArea();
        textArea.setVisibleLines(20);
        textArea.setCharacterWidth(50);
        textArea.setText("Loading user data");
        DataController.getInstance().getDirectory(null, new Callback<Directory>() {

            public void doSuccess(Directory result) {
                textArea.setText(result.toString());
            }
        });
        return textArea;
    }
}
